<div class="modal-header" style="padding:3px 10px;">
	<b style="font-size:16px;">添加岗位</b>
	<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>	
</div>
<div class="modal-body clearfix">
	<form id="ad_Form" class="form-horizontal m-t" method="Post">
		<input type="hidden" name="position_id" value="{$position_id}">
		<input type="hidden" name="parent_id" value="{$parent_id}">
		<input type="hidden" name="department_id" value="{$department_id}">
	<div class="col-sm-12">
		<div class="form-group">
			<label class="control-label col-sm-2 col-sm-offset-1" for="name">岗位名称：</label>  
			<div class="col-sm-8">
				<input type="text" name="name"  class="form-control" />
			</div>
		</div>
		<div class="form-group">
			<label class="control-label col-sm-2 col-sm-offset-1" for="name">所属部门：</label>  
			<div class="col-sm-8">
				<input type="text" readonly="readonly" value="{$department_name}" class="form-control" />
			</div>
		</div>
		<div class="form-group">
			<label class="control-label col-sm-2 col-sm-offset-1" for="name">上级岗位：</label>  
			<div class="col-sm-8">
				<input type="text" readonly="readonly"  value="{$position_name}" class="form-control" />
			</div>
		</div>

		<div class="form-group ">
			<label class="control-label col-sm-2 col-sm-offset-1" for="name">岗位描述：</label>  
			<div class="col-sm-8">
				<textarea name="description" id="" class="form-control" cols="30" rows="3"></textarea>
			</div>
		</div>
	</div>
	</form>
</div>
<script>
    $(document).ready(function(){
		$('.date').datepicker({
			format: "yyyy-mm-dd",
            todayBtn: "linked",
            keyboardNavigation: false,
            forceParse: false,
            calendarWeeks: true,
            autoclose: true
        });
		$("#adbtn").click(function(){
	        	$.ajax({
				type: "POST",
				url: "{:U('position_up')}",
				data:$("#ad_Form").serialize(),
				async: true,
				success: function(data) {
					if(data.status == 1){
						swal({
							title: "添加成功！",
							text: "跳转中!",
							type: "success"
						});
						$('#Modal').modal('hide');
						top.location.reload();
					}else{
						 swal({
							title: "添加失败!",
							text: data.info,
							type: "error"
						});
					}
				}
			});
		})
	});
</script>
<div class="modal-footer" style="padding:8px 22px;">
	<button type="button" id="adbtn" class="btn btn-primary">保存</button>
	<button type="button" class="btn btn-white" data-dismiss="modal">关闭</button>
</div>
					
